package com.bw.MyController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
class MyController {
    @RequestMapping("tologin")
    public String tologin(){
        return "login";
    }

    @RequestMapping("login")
    public String login(String name,String pwd){
        if("admin".equals(name) && "123456".equals(pwd)){
            return "success";
        }else {
            return "redirect:tologin.do";
        }


    }


}
